package com.sto.common.designMode.factory;

import lombok.extern.slf4j.Slf4j;

/**
 * 简单工厂模式
 * 客户端
 *
 * @author ChenPeng
 * @since 2022-07-23 23:32
 */
@Slf4j
public class Main {
    public static void main(String[] args) {
        try {
            AbstractOperation operation = OperationFactory.createOperation("/");
            Double result = operation.getResult(1d, 0d);
            System.out.println(result);
        } catch (Exception e) {
            log.info("运算报错" + e);
        }
    }
}
